package com.albaba.designpattern.interpreter.text_002;

/**
 * @Description: 数字表达式
 * @Author zx
 * @Date 2025/2/28 14:51
 * @Version 1.0
 */
public class NumExpression implements Expression{

    private long number;


    public NumExpression(long number) {
        this.number = number;
    }

    public NumExpression(String number) {
        this.number = Long.parseLong(number);
    }

    @Override
    public long interpret() {
        return this.number;
    }
}
